package com.sls.nzdapplication.model;


import com.alibaba.fastjson.JSONObject;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;

import java.util.Date;

@Entity
public class EquipmentLine {

    @Id
    private String id;

    private String startEquipmentId;

    private String endEquipmentId;

    private String type;

    private String lineId;

    private Date createTime;

    private String createBy;

    private Date modifyTime;

    private String modifyBy;

    public JSONObject toJson(){
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("id",this.id);
        jsonObject.put("startEquipmentId",this.startEquipmentId);
        jsonObject.put("endEquipmentId",this.endEquipmentId);
        jsonObject.put("type",this.type);
        jsonObject.put("lineId",this.lineId);
        jsonObject.put("createTime",this.createTime);
        jsonObject.put("createBy",this.createBy);
        jsonObject.put("modifyTime",this.modifyTime);
        jsonObject.put("modifyBy",this.modifyBy);;
        return jsonObject;
    }

    public EquipmentLine(JSONObject jsonObject){
        this.id = jsonObject.getString("id");
        this.startEquipmentId = jsonObject.getString("startEquipmentId")==null?"":jsonObject.getString("startEquipmentId");
        this.endEquipmentId = jsonObject.getString("endEquipmentId")==null?"":jsonObject.getString("endEquipmentId");
        this.type = jsonObject.getString("type")==null?"":jsonObject.getString("type");
        this.lineId = jsonObject.getString("lineId")==null?"":jsonObject.getString("lineId");
        this.createTime = jsonObject.getDate("createTime");
        this.createBy = jsonObject.getString("createBy");
        this.modifyTime = jsonObject.getDate("modifyTime");
        this.modifyBy = jsonObject.getString("modifyBy");
    }

    @Generated(hash = 567120021)
    public EquipmentLine(String id, String startEquipmentId, String endEquipmentId, String type,
            String lineId, Date createTime, String createBy, Date modifyTime, String modifyBy) {
        this.id = id;
        this.startEquipmentId = startEquipmentId;
        this.endEquipmentId = endEquipmentId;
        this.type = type;
        this.lineId = lineId;
        this.createTime = createTime;
        this.createBy = createBy;
        this.modifyTime = modifyTime;
        this.modifyBy = modifyBy;
    }

    @Generated(hash = 1166278161)
    public EquipmentLine() {
    }

    public String getId() {
        return this.id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getStartEquipmentId() {
        return this.startEquipmentId;
    }

    public void setStartEquipmentId(String startEquipmentId) {
        this.startEquipmentId = startEquipmentId;
    }

    public String getEndEquipmentId() {
        return this.endEquipmentId;
    }

    public void setEndEquipmentId(String endEquipmentId) {
        this.endEquipmentId = endEquipmentId;
    }

    public String getType() {
        return this.type;
    }

    public void setType(String type) {
        this.type = type;
    }


    public String getLineId() {
        return this.lineId;
    }

    public void setLineId(String lineId) {
        this.lineId = lineId;
    }

    public Date getCreateTime() {
        return this.createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getCreateBy() {
        return this.createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public Date getModifyTime() {
        return this.modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    public String getModifyBy() {
        return this.modifyBy;
    }

    public void setModifyBy(String modifyBy) {
        this.modifyBy = modifyBy;
    }



}
